﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace JWXH.XH.components.tableview
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class BaseTableView : ContentView
    {
        public BaseTableView()
        {
            InitializeComponent();
            BindingContext = this;
            //            GridLength g = 100;
        }

        public static readonly BindableProperty LabelTextProperty = BindableProperty.Create("LabelText", typeof(string), typeof(BaseTableView));
        public string LabelText { get => (string)GetValue(LabelTextProperty); set => SetValue(LabelTextProperty, value); }

        public static readonly BindableProperty LabelTextColorProperty = BindableProperty.Create("LabelTextColor", typeof(Color), typeof(BaseTableView), Color.FromHex("#333333"));
        public Color LabelTextColor { get => (Color)GetValue(LabelTextColorProperty); set => SetValue(LabelTextColorProperty, value); }


        public static readonly BindableProperty LabelWidthProperty = BindableProperty.CreateAttached("LabelWidth", typeof(int), typeof(BaseTableView), 100);

        public int LabelWidth
        {
            get => (int) GetValue(LabelWidthProperty);
            set => SetValue(LabelWidthProperty, value);
        }
    }
}